module native2ast_top#(
parameter  WIDTH     = 640,//视频宽度
parameter  HEIGHT    = 480,//视频高度
parameter  DWIDTH    = 24  //数据位宽
	)(
    input               clk         ,
	input               rst_n       ,
	input               pre_vsync   ,
	input               pre_hsync   ,
	input               pre_valid   ,
	input  [DWIDTH-1:0] pre_data    ,
	output              almost_full ,
    input               source_ready,
	output              source_valid,
	output              source_eop  ,
	output              source_sop  ,
	output [DWIDTH-1:0] source_data  
    );

wire              valid_w0;
wire              eop_w0  ;
wire              sop_w0  ;
wire [DWIDTH-1:0] data_w0 ;
//接口转换
native2ast_trans#(
	.IMG_VDISP(HEIGHT),
	.DWIDTH(DWIDTH)
) u_native2ast_trans(
    .clk(clk)               ,
	.rst_n(rst_n)           ,
	.pre_vsync(pre_vsync)   ,
	.pre_href(pre_hsync),
	.pre_valid(pre_valid)   ,
	.pre_data(pre_data)     ,
	.source_valid(valid_w0) ,
	.source_eop(eop_w0)     ,
	.source_sop(sop_w0)     ,
	.source_data(data_w0)    
    );
//AST不带反压信号转带反压信号（ready）
ast_readylatency_adapt#(
	.DWIDTH       (DWIDTH), 
	.WIDTH        (WIDTH ), 
	.HEIGHT       (HEIGHT), 
	.FIFO_DEPTH   (1024  ) //FIFO的深度，必须为2的整数次方倍并且大于32
)u_ast_readylatency_adapt_0(
	.clk         (clk         ),
	.rst_n       (rst_n       ),
	.sink_sop    (sop_w0      ),
	.sink_valid  (valid_w0    ),
	.sink_data   (data_w0     ),
	.sink_eop    (eop_w0      ), 
	.sink_ready  (sink_ready  ),             
	.source_sop  (source_sop  ),
	.source_valid(source_valid),
	.source_data (source_data ),
	.source_eop  (source_eop  ),
	.source_ready(source_ready)
);
endmodule